package com.nengchuan.eic.nceconomy.service;

import com.nengchuan.eic.nceconomy.component.template.ResponseModel;
import com.nengchuan.eic.nceconomy.entity.po.TemplateDic;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nengchuan.eic.nceconomy.entity.po.TemplateFile;
import com.nengchuan.eic.nceconomy.entity.vo.ExcelSheetListVO;
import com.nengchuan.eic.nceconomy.entity.vo.SheetDetail;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 模板字典表 服务类
 * </p>
 *
 * @author luoping
 * @since 2020-04-23
 */
public interface TemplateDicService extends IService<TemplateDic> {
    /**
     * 保存模板信息
     * @param templateResponses
     * @param templateFile
     * @return
     */
    int save(List<ResponseModel> templateResponses, TemplateFile templateFile);

    /**
     * 获取模板信息
     * @param categoryIndex
     * @param projectIndex
     */
    SheetDetail getTemplate(String categoryIndex, String projectIndex,Long sheetId);

    /**
     * 获取模板sheetList
     * @param categoryIndex
     * @param projectIndex
     */
    ExcelSheetListVO getTemplateSheetList(String categoryIndex, String projectIndex);

    List<Map<String,Object>> getSheetListByPid(Long id, Long sheetId);

    String download(Long templateId)  throws Exception;
}
